//ArraysLength.java
package com.ylaihui.array;

public class ArraysLength {
	public static void main(String[] args) {
		int[][] arr = new int[][]{{1,2,3,4},{1,2},{1,2,3,4,5}};
		// arr.length 是外层数组的长度
		// arr[i].length 是外层数组的每个元素的长度
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr[i].length; j++) {
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
	}
}
